package com.ibeetl.cms.dao;

import com.ibeetl.cms.entity.Enterprise;
import org.beetl.sql.core.annotatoin.Param;
import org.beetl.sql.core.annotatoin.SqlResource;
import org.beetl.sql.core.engine.PageQuery;
import org.beetl.sql.core.mapper.BaseMapper;

import java.util.List;

/**
 * Enterprise Dao
 */
@SqlResource("cms.enterprise")
public interface EnterpriseDao extends BaseMapper<Enterprise>{
    public PageQuery<Enterprise> queryByCondition(PageQuery query);
    public PageQuery<Enterprise> queryByConditionMaintain(PageQuery query);
    public void batchDelEnterpriseByIds(@Param("ids") List<Long> ids);
    public Enterprise findCompanyId(long userid);
    public Enterprise findenterprise(long userid);
    Integer findorgUserId(String organizationCode);
    Integer findorgId(String organizationCode);
    Enterprise queryByUserId(@Param("userId") Integer userId);
    public void invalid(List<Long> ids);
    List<Enterprise> findAll();


    List<Enterprise> findAllOrg();

    List<Enterprise> findEnterpriseInfo();

    int updateQuota(Integer id);

    void batchUpdate( List<Long> dels);

    void deleteEnterprise( List<Long> dels);

    void updateByCode(Enterprise entity);


//    名录导入
    PageQuery<Enterprise> queryByConditionInfo(PageQuery query);

    void updateByCodeInfo(Enterprise dict);

    Enterprise selectByOrganizationCodeInfo(@Param("organizationCode") String organizationCode,@Param("enterpriseDirectory") String enterpriseDirectory);

    void insertInfo(Enterprise dict);

}